<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./JS/vue.js"></script>
</head>

<body>
    <div class="box">
        <h1>{{msg}}</h1>
        <!-- <h1 v-if = 'flag'>{{msgY}}</h1>
        <h1 v-else>{{msgN}}</h1> -->

        <h1 v-if="num > 8">{{msgY}}</h1>
        <h1 v-else-if="num > 5">{{msgmid}}</h1>
        <h1 v-else>{{msgN}}</h1>

    </div>

    <script>
        let vm = new Vue({
            el: '.box',
            data: {
                msg: '你吃了吗？',
                flag: true,
                num: 6,
                msgY: "吃过了",
                msgmid: '正准备吃呢',
                msgN: '还没吃呢',
            }
        })
    </script>
</body>

</html>